import request from "@/utils/request";

export interface RecordsParams {
  id?: string,
  uid?: string | string[] | null,
  userName?: string
  content?: string
  phone?: string
  courseName?: string
  purpose?: string
  object?: string
  duan?: string
  createTime?: string
  courseId?: string | string[] | null
  pageSize?: number | undefined;
  current?: number | undefined;
  keyword?: string | undefined;
  createUser?: string
  createUserName?: string
}

// 沟通记录列表
export async function getComRecordsList(params?: RecordsParams) {
  return request('/teach-admin/admin/courseUserCommunicate/list', {
    method: 'POST',
    data: params
  });
}
// 删除沟通记录
export async function getDeleteItem(params?: RecordsParams) {
  return request('/teach-admin/admin/courseUserCommunicate/delete', {
    method: 'POST',
    data: params
  });
}
// 沟通记录详情
export async function getRecordsInfo(params?: RecordsParams) {
  return request('/teach-admin/admin/courseUserCommunicate/info', {
    method: 'POST',
    data: params
  });
}
// 编辑
export async function getEditRecords(params?: RecordsParams) {
  return request('/teach-admin/admin/courseUserCommunicate/update', {
    method: 'POST',
    data: params
  });
}
// 添加
export async function getAddRecords(params?: RecordsParams) {
  return request('/teach-admin/admin/courseUserCommunicate/save', {
    method: 'POST',
    data: params
  });
}
// 导出
export async function exportRecords(params?: any) {
  return request('/teach-admin/admin/courseUserCommunicate/export', {
    method: 'POST',
    responseType: 'blob',
    data: params
  });
}